home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / BibTeX 1.06 FAT.sit / BibTeX ƒ / Source code / CBibTeXApp.h < prev    next >
Text File  |  1996-05-31  |  4KB  |  83 lines

  1. /**************************************************************************
  2. *                                                                         *
  3. * Product:    Bibtex                                                   *
  4. * Class:      CBibtexApp                                                 *
  5. * Superclass: LApplication                                                *
  6. * File:       CBibTeXApp.h                                               *
  7. * Abstract:   This file overrides the standard PowerPlant application to  *
  8. *             provide the features that we need for Bibtex.            *
  9. * History:                                                                *
  10. *     1.0     17-Jul-95   RJZ.  Initial version.                          *
  11. *                                                                         *
  12. **************************************************************************/
  13. #pragma once
  14.  
  15. #include <LDocApplication.h>
  16.  
  17. class   CBibtexApp : public LDocApplication {
  18.   public:
  19.                                         // data members
  20.     Boolean             mAutoQuit;
  21.     LWindow             *mLogWindow;
  22.     Boolean             mGoOnOpen;
  23.     Boolean             mGotBtxFile;
  24.     Boolean             mPrefsFileExists;
  25.     Boolean  mBigBibTeX;
  26.     
  27.     static FileFilterUPP sGetBtxFileFilter;
  28.     static TEHandle     sTextEditH;     // handle to TextEdit record
  29.     static LTextEdit    *sTextEditPane; // pointer to TextEdit pane
  30.  
  31.                                         // member functions
  32.  
  33.                                         // constructor registers all PPobs
  34.                         CBibtexApp();
  35.                                         // stub destructor
  36.     virtual             ~CBibtexApp();
  37.  
  38.     virtual Boolean     AllowSubRemoval(LCommander *inSub);
  39.  
  40.                                         // this overriding function performs
  41.                                         // application functions
  42.  
  43.     virtual Boolean     ObeyCommand(CommandT inCommand, void* ioParam);
  44.     void                CreatePrefsFile(void);
  45.  
  46.                                         // this overriding function returns the
  47.                                         // status of menu items
  48.  
  49.     virtual void        FindCommandStatus(CommandT inCommand,
  50.                                           Boolean  &outEnabled,
  51.                                           Boolean  &outUsesMark,
  52.                                           Char16   &outMark,
  53.                                           Str255   outName);
  54.     static  void        DisplayInLogWindow(char *inMessage, Int32 inSize);
  55.     void                DoSaveSettings(void);
  56.     static pascal Boolean GetBtxFileFilter(CInfoPBPtr pb);
  57.     void                OpenOptionsDialog(void);
  58.     static  void        PostErrorAlert(StringPtr inMessage);
  59.     void                SetDialogOptions(SDialogResponse *inResponse);
  60.  
  61.     LModelObject        *MakeNewDocument(void);
  62.     void                ChooseDocument(void);
  63.     void                OpenDocument(FSSpec *inMacFSSpec);
  64.  
  65.     void                ReadBooleanPref(Boolean& outValue, short inID,
  66.                                         short inFileRefNum);
  67.     void                ReadLongPref(long& outValue, short inID,
  68.                                         short inFileRefNum);
  69.     void                ReadStringPref(StringPtr outValue, short inID,
  70.                                         short inFileRefNum);
  71.  
  72.     void                WriteBooleanPref(Boolean inValue, short inID,
  73.                                             short inFileRefNum);
  74.     void                WriteLongPref(long inValue, short inID,
  75.                                             short inFileRefNum);
  76.     void                WriteStringPref(StringPtr inValue, short inID,
  77.                                             short inFileRefNum);
  78. protected:
  79.     void    ResetWindow(void);
  80.  
  81.     virtual void        StartUp();      // overriding startup functions
  82. };
  83.